output : 'babl.css',
configuration : configuration_data())
+index_html_tmp_env = [
+ 'BABL_PATH='+ join_paths(meson.build_root(), 'extensions'),
+]
+
index_html_tmp = custom_target('index.html.tmp',
input : [ babl_html_dump, ],
output: [ 'index.html.tmp', ],
command: [
env_bin,
- 'BABL_PATH='+ join_paths(meson.build_root(), 'extensions'),
+ index_html_tmp_env,
babl_html_dump
],
capture: true,
build_os.startswith('cygwin') or
build_os.startswith('windows'))
+# Only run cross compile objects if we have exe wrapper
+cc_can_run = not meson.is_cross_build() or meson.has_exe_wrapper()
################################################################################
# Compiler arguments
################################################################################
# Build utilities
-env_bin = find_program('env', required: true, native: true)
+env_bin = find_program('env', required: false, native: true)
git_bin = find_program('git', required: false, native: true)
rsvg_convert_bin = find_program('rsvg-convert', required: false,
native: true)
test_bin = find_program('test', required: false, native: true)
w3m_bin = find_program('w3m', required: false, native: true)
+################################################################################
+# Build flags
+
+build_docs = false
+
+if get_option('with-docs')
+ if cc_can_run and env_bin.found() and not build_platform_win32
+ build_docs = true
+ else
+ warning('Unable to generate docs in this environment')
+ endif
+endif
+
################################################################################
# Configuration files
subdir('extensions')
subdir('tests')
subdir('tools')
-if get_option('with-docs')
+if build_docs
subdir('docs')
endif
-
-if w3m_bin.found()
+if w3m_bin.found() and build_docs
custom_target('README',
input : [ join_paths('docs', 'index.html'), ] ,
output: [ 'README' ] ,